/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.floor.entity;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.wealth.commodity.entity.Goods;

@Entity
@Table(name = "pc_floor_item")
public class PcFloorItem implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private String name;
	private String picurl;
	private String linkurl;
	private Integer seq;
	private Integer status;
	private String creator;
	private Date createTime;
	private Integer sortno;
	private PcFloor floor;
	private Goods goods;
	
	/* ---------------- method ----------------*/
	
	public PcFloorItem(){
	}

	public PcFloorItem(Long id){
		this.id = id;
	}

	/* ---------------- getter/setter ----------------*/
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "name")
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "picurl")
	public String getPicurl() {
		return picurl;
	}
	
	public void setPicurl(String picurl) {
		this.picurl = picurl;
	}
	
	@Column(name = "linkurl")
	public String getLinkurl() {
		return linkurl;
	}
	
	public void setLinkurl(String linkurl) {
		this.linkurl = linkurl;
	}
	
	@Column(name = "seq")
	public Integer getSeq() {
		return seq;
	}
	
	public void setSeq(Integer seq) {
		this.seq = seq;
	}
	
	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Column(name = "creator")
	public String getCreator() {
		return creator;
	}
	
	public void setCreator(String creator) {
		this.creator = creator;
	}
	
	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getSortno() {
		return sortno;
	}

	public void setSortno(Integer sortno) {
		this.sortno = sortno;
	}
	@ManyToOne
	@JoinColumn(name="floor_id")
	public PcFloor getFloor() {
		return floor;
	}

	public void setFloor(PcFloor floor) {
		this.floor = floor;
	}
	
	@OneToOne
	@JoinColumn(name="goods_id")
	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	
	
}



